﻿using NB.MGJ.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NB.MGJ.Model
{
    /// <summary>
    /// 用户表
    /// </summary>
    public class Sys_User
    {
        /// <summary>
        /// 日志ID
        /// </summary>
        [Property("Key")]
        public int ID{set;get;}
        /// <summary>
        /// 是否删除
        /// </summary>
        public int? ViewDel { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public int? ViewFlag { get; set; }
        /// <summary>
        /// 机构ID
        /// </summary>
        public int? EnterpriseId { get; set; }
        /// <summary>
        /// 登录名
        /// </summary>
        public string LoginName { set; get; }
        /// <summary>
        /// 姓名
        /// </summary>
        public string RealName { get; set; }
          /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Modile { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 账户禁用时间
        /// </summary>
        public DateTime? DisableTime { get; set; }
        /// <summary>
        /// 账户最后修改者ID
        /// </summary>
        public int? ChangeLoginID { get; set; }
        /// <summary>
        /// 账户最后修改者姓名
        /// </summary>
        public string ChangeLoginName { get; set; }
        /// <summary>
        /// 账户创建时间
        /// </summary>
        public DateTime? ChangeDate { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public int? Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public int?  City{ get; set; }

        /// <summary>
        /// 用户头像
        /// </summary>
        public string UserImg { get; set; }
        /// <summary>
        /// 经销商
        /// </summary>
        public int? Distributor { get; set; }
        
        /// <summary>
        /// 用户类型 1机构 2普通用户
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 默认管理员用户ID  0企业自定义用户 
        /// </summary>
        public int AdminRoleID { get; set; }

        [NotMapped]
		public string EnterpriseName { get; set; }

        [NotMapped]
		public string LandlinePhone { get; set; }
        
        [NotMapped]
		public string roleNames { get; set; }
           [NotMapped]
        public int rid { get; set; }

        /// <summary>
        /// 微信ID
        /// </summary>
        public string WXID { get; set; }
    }
}
